<template>
  <div>
    <button @click="isShow = !isShow">切换显示/隐藏Demo组件</button>
    <Demo v-if="isShow" />
  </div>
</template>

<script>
import { ref } from 'vue';
import Demo from "./components/Dome.vue";
export default {
  name: "App",
  components: {
    Demo,
  },
  setup() {
    let isShow = ref(true)

    return {
      isShow
    }
  },
};
</script>
